.upload-course-container {
  max-width: 800px;
  margin: 0 auto;
}

.upload-course-box {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.upload-course-box h2 {
  margin: 0 0 30px 0;
  color: #333;
  font-size: 24px;
  padding-bottom: 15px;
  border-bottom: 2px solid #667eea;
}

/* 课程信息展示 */
.course-info-section {
  background: #f5f7fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.course-info-section h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

.info-item {
  margin-bottom: 10px;
  line-height: 1.6;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item .label {
  color: #666;
  font-size: 14px;
}

.info-item .value {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

/* 上传区域 */
.upload-section {
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.form-group label.required::after {
  content: ' *';
  color: #ff4d4f;
}

.upload-area {
  margin-bottom: 8px;
}

.upload-btn {
  display: inline-block;
  padding: 10px 24px;
  background: white;
  color: #667eea;
  border: 1px dashed #667eea;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.upload-btn:hover {
  background: #f0f2ff;
  border-color: #4c63d2;
  color: #4c63d2;
}

.upload-tip {
  color: #999;
  font-size: 12px;
  margin-top: 8px;
}

/* 封面预览 */
.cover-preview {
  margin-top: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}

.cover-preview img {
  width: 100%;
  max-width: 400px;
  display: block;
}

.cover-info {
  padding: 10px;
  background: #fafafa;
  color: #666;
  font-size: 14px;
}

/* 视频列表 */
.video-list {
  margin-top: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
}

.list-header {
  padding: 12px 15px;
  background: #fafafa;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drag-tip {
  color: #999;
  font-size: 12px;
  font-weight: normal;
}

.video-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 15px;
  border-bottom: 1px solid #e8e8e8;
  transition: all 0.3s;
  cursor: move;
  gap: 10px;
}

.video-item:last-child {
  border-bottom: none;
}

.video-item:hover {
  background: #fafafa;
}

.video-item.dragging {
  opacity: 0.5;
  background: #f0f2ff;
  border: 2px dashed #667eea;
}

.drag-handle {
  color: #999;
  cursor: grab;
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  flex-shrink: 0;
  transition: color 0.3s;
}

.drag-handle:hover {
  color: #667eea;
}

.drag-handle:active {
  cursor: grabbing;
}

.video-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 8px;
}

.video-info-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.video-name {
  color: #666;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-title-wrapper {
  position: relative;
  width: 100%;
}

.video-title-input {
  width: 100%;
  padding: 6px 10px;
  padding-right: 20px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  transition: all 0.3s;
}

.video-title-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.video-title-input.required-empty {
  border-color: #ff4d4f;
}

.video-title-input.required-empty:focus {
  border-color: #ff4d4f;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.1);
}

.video-title-input::placeholder {
  color: #999;
}

.required-mark {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #ff4d4f;
  font-size: 14px;
  font-weight: bold;
  pointer-events: none;
}

.video-size {
  color: #999;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 8px;
  white-space: nowrap;
}

.remove-video-btn {
  padding: 6px 12px;
  background: white;
  color: #ff4d4f;
  border: 1px solid #ff4d4f;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s;
  margin-top: 8px;
  white-space: nowrap;
}

.remove-video-btn:hover {
  background: #ff4d4f;
  color: white;
}

.preview-video-btn {
  padding: 6px 12px;
  background: white;
  color: #667eea;
  border: 1px solid #667eea;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s;
  margin-right: 8px;
  margin-top: 8px;
  white-space: nowrap;
}

.preview-video-btn:hover {
  background: #667eea;
  color: white;
}

/* 底部按钮 */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}

.cancel-btn,
.submit-btn {
  padding: 10px 32px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.cancel-btn {
  background: white;
  color: #666;
  border: 1px solid #d9d9d9;
}

.cancel-btn:hover {
  color: #333;
  border-color: #999;
}

.submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 视频预览弹窗 */
.video-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.video-preview-content {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.preview-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 20px;
}

.close-preview-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  color: #666;
  font-size: 20px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.close-preview-btn:hover {
  background: #e8e8e8;
  color: #333;
}

.preview-video {
  width: 100%;
  max-height: calc(90vh - 140px);
  background: #000;
  outline: none;
}

.preview-info {
  display: flex;
  justify-content: space-around;
  padding: 15px 20px;
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
}

.preview-info span {
  color: #666;
  font-size: 14px;
}

